/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const permRouter = {
  path: '/admin',
  component: Layout,
  redirect: '/perm/complex-table',
  name: 'Table',
  meta: {
    title: '系统管理',
    icon: 'table',
    noCache: true,
    roles: ['admin']
  },
  children: [
    {
      path: 'user',
      component: () => import('@/views/perm/user/index'),
      name: 'user',
      meta: { title: '用户管理',roles: ['clinic/user'] }
    },
    /*{
      path: 'department',
      component: () => import('@/views/perm/department'),
      name: 'department',
      meta: { title: '科室管理',roles: ['perm/department']  }
    },*/
    {
      path: 'rolePerm',
      component: () => import('@/views/perm/role/rolePerm'),
      name: 'rolePerm',
      meta: { title: '角色管理' ,roles: ['clinic:role:list']}
    },

    {
      path: 'clinicPerm',
      component: () => import('@/views/perm/clinic/clinicPerm'),
      name: 'clinicPerm',
      meta: { title: '门诊管理' ,roles: ['sys:clinic:list']}
    },
    {
      path: 'menuPerm',
      component: () => import('@/views/perm/menu'),
      name: 'menu',
      meta: { title: '菜单管理' ,roles: ['sys:perm:list']}
    },
  ]
}
export default permRouter
